function forOf(obj,cb){








     let iterator=obj[Symbol.iterator]()
     let res= iterator.next()
     while(!res.done){        //执行了一次next
          cb(res.value)
          res=iterator.next()
     }
}



var colors=['red','green','blue']
forOf(arr,function(value){






})
// forOf遍历的是迭代器对象